package Com.amit.Java_New_Feature;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class Lab22 {

		public static void main(String[] args) {
	
			Map<Integer, String> map=new HashMap<Integer, String>();
			map.put(1, "amit");
			map.put(2, "anil");
			
			
			Set<Map.Entry<Integer, String>> set=map.entrySet();
			
			Iterator<Map.Entry<Integer, String>> itr=set.iterator();
			
			while(itr.hasNext())
			{
             Map.Entry<Integer, String> m=itr.next();
             System.out.println(m.getKey()+" "+m.getValue());
			}
			
			
		
			
			
			
			
			
	}

}
